﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI.WebControls;
using DCT.Data;
using DCT.Entities;


/// <summary>
/// Summary description for BindCatalog
/// </summary>
public class BindCatalog
{
    public BindCatalog()
    {
        //
        // TODO: Add constructor logic here
        //
    }

    public static void BindBoSuuTap(DropDownList cboCatalog)
    {
       TList<BoSuuTap> TList_Catalog = DataRepository.BoSuuTapProvider.GetAll();
        cboCatalog.DataSource = TList_Catalog;
        cboCatalog.DataValueField = "Id";
        cboCatalog.DataTextField = "Ten";
        cboCatalog.DataBind();
        ListItem ItemChoose = new ListItem();
        ItemChoose.Text = " -- Tên Bộ Sưu Tập --";
        ItemChoose.Value = "0";
        cboCatalog.Items.Insert(0, ItemChoose);
    }
    public static void BindLichTuan(DropDownList cboCatalog)
    {
        TList<LichTuan> TList_Catalog = DataRepository.LichTuanProvider.GetAll();
        cboCatalog.DataSource = TList_Catalog;
        cboCatalog.DataValueField = "Id";
        cboCatalog.DataTextField = "TenLichTuan";
        cboCatalog.DataBind();
        ListItem ItemChoose = new ListItem();
        ItemChoose.Text = " -- Tên Lịch Tuần --";
        ItemChoose.Value = "0";
        cboCatalog.Items.Insert(0, ItemChoose);
    }
}